﻿using AVCJobDispatcherWindows.TaskJobEngine;
using Microsoft.Extensions.Configuration;
using System.IO;

namespace AVCJobDispatcherWindows
{
    public class MainService
    {
        #region 服务启动
        public void OnStart()
        {
            var build = new ConfigurationBuilder();
            build.SetBasePath(Directory.GetCurrentDirectory());
            build.AddJsonFile("//TaskJob.json", true, true);
            build.AddJsonFile("//Config.json", true, true);
            var dbConfig = build.Build();
            TaskJobManager.Start(dbConfig);

        }
        #endregion

        #region 服务停止
        public void OnStop()
        {
            // DO NOTHING
        }
        #endregion

    }
}
